﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Demo02
{
    class Class1
    {

        public void SumUtils1(int a, int b)
        {
            int sum;
            sum = a + b;
            Console.WriteLine("和为：" + sum);
        }
        public void SumUtils1(double d, double c)
        {
            double sum;
            sum = d + c;
            Console.WriteLine("和为：" + sum);
        }
        public void SumUtils1(string e, string f)
        {
            string sum;
            sum = e + f;
            Console.WriteLine("和为：" + sum);
        }
        public void SumUtils1(int c)
        {
            int sum = 0;
            for (int i = 0; i < c; i++)
            {
                sum += c;
            }
            Console.WriteLine("从 1 到指定整数的和为:" + sum);
        }
    }
}
